# P407-P411
# 类属性
class Tool:

    # 记录创建工具对象的总数
    count = 0

    def __init__(self, name):
        self.name = name
        Tool.count += 1

# 创建工具对象
fu_tou = Tool("斧头")
cai_dao = Tool("菜刀")
kan_dao = Tool("看砍刀")
cai_dao.count += 1
print(kan_dao.count)